trigger Assignment6_1_Teacher on Contact (before insert, before update) {
   if(Trigger.isInsert) {
       for(Contact c : Trigger.new){
           String subjectsList = c.Subjects__c;
           if(subjectsList.contains('Hindi')){
               System.debug(logginglevel.INFO, 'subjectsList ---- > ' + subjectsList);
               c.addError('Can not insert a hindi teacher');
           }
       }
   }else {
       for(Contact c : Trigger.new){
           String subjectsList = c.Subjects__c;
           System.debug(logginglevel.INFO, 'subjectsList ---- > ' + subjectsList);
           if(subjectsList.contains('Hindi')){
               c.addError('Can not update a hindi teacher');
           }
       }
   }

}